<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
      //箭头函数，如果返回的是一个对象，那么为了区别{}代码块，我们必须把对象用括号包起来。前置条件是就一行。
      var func = (a,b) =>({name:a,age:b});
      var obj = func('123',12);
      console.log(obj)
    </script>
</body>
</html>